﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace WindowsGame1
{
    class Menu
    {
       
        public static gamestate afficher_menu()
        {

            Game1.ssm = false;
         
                MouseState MState = Mouse.GetState();
                Vector2 ballePosition = new Vector2(MState.X, MState.Y);
                if (MState.LeftButton == ButtonState.Pressed)
                {
                    if (MState.X >= 90 && MState.X <= 250)
                    {
                        if (MState.Y >= 255 && MState.Y <= 275 && fonctions.a_agi == false && Game1.menu ==0) //ACTION
                        {
                            Game1.menu++;
                       
                        }
                        else if (MState.Y >= 310 && MState.Y <= 330 && !fonctions.déplacé && Game1.menu == 0) //DEPLACEMENT
                        {
                            return gamestate.DEPLACEMENT;
                        }
                        else if (MState.Y >= 360 && MState.Y <= 380 && Game1.menu == 0) //FIN DU TOUR
                        {
                         
                            fonctions.a_agi = false;
                            fonctions.déplacé = false;
                        }
                        else if (MState.Y > 275 && MState.Y <= 295 && !fonctions.a_agi && Game1.menu == 1)
                        {
                            Game1.menu++;
                            if (Game1.menu == 2)
                            {
                          
                                fonctions.a_agi = true;
                                Game1.menu = 0;
                                return gamestate.ATTAQUE;
                              
                            }
                        }
                        else if (MState.Y > 330 && MState.Y <= 345 && !fonctions.a_agi && Game1.menu == 1 || Game1.menu == 2)
                        {
                            Game1.menu = 0;
                      
                        }

                    }
                }
            
                return gamestate.DEFAUT;
            
            }
        
        
  



        }
    }

